<!DOCTYPE>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>游戏</title>
<%@ include file="../common/home_head.jsp"%>
<style>
	#search{
		width:35% ; 
		float:right;
		margin-top:1%;
	}
	#search input[type="text"]{
		background:#FFF;
	}
</style>
</head>
<body style="background:#FFF;">
<script type="text/javascript">
$(document).ready(function(){
	$("#nav li").removeClass("active");
	$("#nav>li").eq(2).addClass("active");
	var l='${fn:length(games)}';
	var s=0;
	if(l%5>0)
		s=l/5+1;
	else
		s=l/5;
	$("#pageInf").html("当前页数：1 总页数："+parseInt(s));
	
});
</script>
	<div class="sub-banner">
		<%@ include file="../common/navbar.jsp"%>
	</div>
	<c:if test="${!empty news }">
		<div class="events-w3layouts">
			<h2>News</h2>
			<c:forEach items="${news }" var="n" end="0">
				<div class="col-md-7 events-left-agile-agileits-w3layouts" >
					<a href="${pageContext.request.contextPath }/getPalyDetail?gid=${n.palyId}">
						<div class="events-text-w3-agile events-text1">
							<h4>
								<fmt:formatDate value="${n.palyDate }" pattern="yyyy-MM-dd" />
							</h4>
							<p>${n.palyName }</p>
							<ul>
								<li>by ${n.palyDeveloper.devName }</li>
								<li><span class="glyphicon glyphicon-heart"
									aria-hidden="true"></span> ${n.palyHot }</li>
							</ul>
						</div>
					</a>
				</div>
			</c:forEach>
			
			<div class="col-md-5 events-right-agile" >
				<c:forEach items="${news }" var="n1" begin="1" end="1">
					<a
						href="${pageContext.request.contextPath }/getPalyDetail?gid=${n1.palyId}">
						<div class="events-right-top">
							<div class="events-text-w3-agile events-text2">
								<h4>
									<fmt:formatDate value="${n1.palyDate }" pattern="yyyy-MM-dd" />
								</h4>
								<p>${n1.palyName }</p>
								<ul>
									<li>by ${n1.palyDeveloper.devName }</li>
									<li><span class="glyphicon glyphicon-heart"
										aria-hidden="true"></span> ${n1.palyHot }</li>
								</ul>
							</div>
						</div>
					</a>
				</c:forEach>

				<c:forEach items="${news }" var="n3" begin="2" end="2">
					<a
						href="${pageContext.request.contextPath }/getPalyDetail?gid=${n3.palyId}">
						<div class="events-right-bottom">
							<div class="events-text-w3-agile events-text2">
								<h4>
									<fmt:formatDate value="${n3.palyDate }" pattern="yyyy-MM-dd" />
								</h4>
								<p>${n3.palyName }</p>
								<ul>
									<li>by ${n3.palyDeveloper.devName }</li>
									<li><span class="glyphicon glyphicon-heart"
										aria-hidden="true"></span> ${n3.palyHot }</li>
								</ul>
							</div>
						</div>
					</a>
				</c:forEach>
				<div class="clearfix"></div>
			</div>
			<div class="clearfix"></div>
		</div>
	</c:if>
	<div class="w3ls_search" id="search">
		<form action="${pageContext.request.contextPath }/search" method="post">
			<input type="text" name="key" placeholder="查找游戏" required="">
			<input type="submit" value=" ">
		</form>
	</div>
	<div class="events-section2-agileinfo">
		<div class="container">
			<c:if test="${!empty games }">
				<c:forEach items="${games }" var="g" end="4">
					<div class="blog2-w3ls">
						<div class="col-md-4 blog-image-w3l">
							<a
								href="${pageContext.request.contextPath }/getPalyDetail?gid=${g.palyId}"><img
								src="${pageContext.request.contextPath }/images/games/${g.palyImg}"
								alt="${g.palyName }" /></a>
						</div>
						<div class="col-md-8 blog-text-w3ls">
							<a
								href="${pageContext.request.contextPath }/getPalyDetail?gid=${g.palyId}"><h4>${g.palyName }</h4></a>
							<div class="item_info">
								<ul>
									<li><a href="#"><i class="glyphicon glyphicon-user"></i>${g.palyDeveloper.devName }</a></li>

									<li><i class="glyphicon glyphicon-tags"></i>${g.palyType.typeName }</li>
									
									<li><i class="glyphicon glyphicon-heart"></i>${g.palyHot }热度</li>
								</ul>
							</div>
							<p>${g.palyIntroduce}</p>
							<a
								href="${pageContext.request.contextPath }/getPalyDetail?gid=${g.palyId}"
								class="blog-read">查看更多</a>
						</div>
						<div class="clearfix"></div>
					</div>
				</c:forEach>
			</c:if>
		</div>
		<!-- <%@ include file="../common/footer-page.jsp" %> -->
	</div>

	
	<%@ include file="../common/footer.jsp"%>
	<%@ include file="../common/loginModal.jsp"%>
</body>
</html>